package com.catsic.zcjc.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;

import com.catsic.base.BaseDao;
import com.catsic.zcjc.entity.MarkLabel;


public interface MarkLabelDao extends BaseDao<MarkLabel, String>{

	 @Query("select m from MarkLabel m where m.label = ?1 and m.type=?2 ")
     public MarkLabel findByLabelAndType(String label,int type); 
	 
	 @Query("select m from MarkLabel m where m.label = ?1 and m.type=?2 and m.createId=?3 ")
     public MarkLabel findByLabelAndUser(String label,int type,String createId); 
	 
	 @Query("select m from MarkLabel m where  (m.createId=?1 and m.type=2) or (m.type=1) order by m.type,m.label")
     public List<MarkLabel> findByUser(String createId); 
}
